Optimal. Leaf size=59 \[ \frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} \tanh (c+d x)}{\sqrt{a}}\right )}{b^{3/2} d (a+b)}+\frac{x}{a+b}-\frac{\tanh (c+d x)}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10793, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3670, 479, 522, 206, 205} \[ \frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} \tanh (c+d x)}{\sqrt{a}}\right )}{b^{3/2} d (a+b)}+\frac{x}{a+b}-\frac{\tanh (c+d x)}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 479
Rule 522
Rule 206
Rule 205
Rubi steps
\begin{align*} \int \frac{\tanh ^4(c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=-\frac{\tanh (c+d x)}{b d}+\frac{\operatorname{Subst}\left (\int \frac{a+(-a+b) x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{b d}\\ &=-\frac{\tanh (c+d x)}{b d}+\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{(a+b) d}+\frac{a^2 \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\tanh (c+d x)\right )}{b (a+b) d}\\ &=\frac{x}{a+b}+\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} \tanh (c+d x)}{\sqrt{a}}\right )}{b^{3/2} (a+b) d}-\frac{\tanh (c+d x)}{b d}\\ \end{align*}
Mathematica [A] time = 0.172031, size = 66, normalized size = 1.12 \[ \frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} \tanh (c+d x)}{\sqrt{a}}\right )}{b^{3/2} d (a+b)}+\frac{c+d x}{d (a+b)}-\frac{\tanh (c+d x)}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 95, normalized size = 1.6 \begin{align*} -{\frac{\tanh \left ( dx+c \right ) }{bd}}+{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) }{d \left ( 2\,b+2\,a \right ) }}+{\frac{{a}^{2}}{d \left ( a+b \right ) b}\arctan \left ({b\tanh \left ( dx+c \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{d \left ( 2\,b+2\,a \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.23915, size = 2043, normalized size = 34.63 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 21.1208, size = 495, normalized size = 8.39 \begin{align*} \begin{cases} \tilde{\infty } x \tanh ^{2}{\left (c \right )} & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac{x - \frac{\tanh ^{3}{\left (c + d x \right )}}{3 d} - \frac{\tanh{\left (c + d x \right )}}{d}}{a} & \text{for}\: b = 0 \\\frac{x - \frac{\tanh{\left (c + d x \right )}}{d}}{b} & \text{for}\: a = 0 \\\frac{3 d x \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{3 d x}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{2 \tanh ^{3}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac{3 \tanh{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} & \text{for}\: a = - b \\\frac{x \tanh ^{4}{\left (c \right )}}{a + b \tanh ^{2}{\left (c \right )}} & \text{for}\: d = 0 \\- \frac{2 i a^{\frac{3}{2}} b \sqrt{\frac{1}{b}} \tanh{\left (c + d x \right )}}{2 i a^{\frac{3}{2}} b^{2} d \sqrt{\frac{1}{b}} + 2 i \sqrt{a} b^{3} d \sqrt{\frac{1}{b}}} + \frac{2 i \sqrt{a} b^{2} d x \sqrt{\frac{1}{b}}}{2 i a^{\frac{3}{2}} b^{2} d \sqrt{\frac{1}{b}} + 2 i \sqrt{a} b^{3} d \sqrt{\frac{1}{b}}} - \frac{2 i \sqrt{a} b^{2} \sqrt{\frac{1}{b}} \tanh{\left (c + d x \right )}}{2 i a^{\frac{3}{2}} b^{2} d \sqrt{\frac{1}{b}} + 2 i \sqrt{a} b^{3} d \sqrt{\frac{1}{b}}} + \frac{a^{2} \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 i a^{\frac{3}{2}} b^{2} d \sqrt{\frac{1}{b}} + 2 i \sqrt{a} b^{3} d \sqrt{\frac{1}{b}}} - \frac{a^{2} \log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 i a^{\frac{3}{2}} b^{2} d \sqrt{\frac{1}{b}} + 2 i \sqrt{a} b^{3} d \sqrt{\frac{1}{b}}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20782, size = 126, normalized size = 2.14 \begin{align*} \frac{a^{2} \arctan \left (\frac{a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt{a b}}\right )}{{\left (a b d + b^{2} d\right )} \sqrt{a b}} + \frac{d x + c}{a d + b d} + \frac{2}{b d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]